<?php
namespace db;

interface Database {

	/**
	 * 
	 * @param string $query
	 * @return \QueryResult the query result
	 */
	function run($query);

	/**
	 * Escapes given string
	 * @param string $string
	 */
	function escapeString($string);
	
	/**
	 * @return TRUE on success or FALSE on failure. 
	 */
	function beginTransaction();
	
	/**
	 * @return TRUE on success or FALSE on failure.
	 */
	function rollback();
	
	/**
	 * @return TRUE on success or FALSE on failure.
	 */
	function commit();

	function close();
}